<template>
   <div class="">

      <div><button >切换</button></div>
      <hr>
      <A v-move:aaa.xiaoman="{background: 'red'}"></A>
   </div>
</template>

<script setup lang='ts'>
import {ref ,Directive} from 'vue'
import A from './components/A.vue'
let flag = ref<boolean>(true)
  // type Dir = {
  //   background:string
  // }
const vMove:Directive ={
  created() {
    console.log('=======>created')
  },
  beforeMount(){
    console.log('=======>beforeMount');
  },

  // el:HTMLElement, dir:DirectiveBinding<Dir>
  // 常用
  mounted(...args:Array<any>){
    console.log('=======>mounted');
    console.log(args);
  },
  beforeUpdate(){
    console.log('=======>beforeUpdate');
  },
  // 常用
  updated(){
    console.log('=======>Update');
  },
  beforeUnmount(){
    console.log('=======>beforeUnmount');
  },
  // 常用
  unmounted() {
    console.log('=======>unmounted');
  },
}
</script>

<style scoped>

</style>